import Vue from 'vue';
import VueRouter from 'vue-router';
import IP from '../views/IP.vue';
import Home from '../views/Home.vue';
import Detail from '../views/Detail.vue';
import search from '../views/search.vue';

Vue.use(VueRouter);

const routes = [
  {
    path: '/',
    name: 'home',
    component:Home
  },
  {
    path: '/ip',
    name: 'IP',
    component: IP
  },
  {
    path: '/detail/:id',
    name: 'detail',
    component: Detail
  },
  {
    path: '/search',
    name: 'search',
    component: search
  }
];

const router = new VueRouter({
  routes
});

export default router;
